#!/usr/bin/env python
# encoding: utf-8
'''
@author: 王震
@license: 四川凡狼科技有限公司
@contact: 2668985108@qq.com
@file: user.py
@time: 2021/10/17 3:56 下午
@desc:
'''

from main import db
import datetime


class User(db.Model):
    __tablename__ = 'USER'

    id = db.Column(db.String(32), primary_key=True, unique=True, nullable=False, comment='id')
    telephone = db.Column(db.String(32), unique=True, nullable=False, comment='登录账户')
    password = db.Column(db.String(128), unique=False, nullable=False, comment='密码')
    identity = db.Column(db.Integer, unique=False, nullable=False, default=0, comment='当前登录者的身份')
    createTime = db.Column(db.DateTime, unique=False, nullable=True, default=datetime.datetime.now, comment='创建时间')
    updateTime = db.Column(db.DateTime, unique=False, nullable=True, default=datetime.datetime.now,
                           onupdate=datetime.datetime.now, comment='更新时间')
